<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<title>距离某个日期的天数</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<script type="text/javascript">
    var endtime = new Date('2012,12,30');
    var starttime = new Date();
    document.write('距离 ' + endtime.toLocaleString() + ' 还有 ' + Math.floor((endtime.getTime() - starttime.getTime()) / 1000 / 3600 / 24) + '天');
</script>

<style type="text/css">
</style>
</head>
    <body>
    </body>
</html>